import request from '@/utils/request'
export default {
  save(appointment) {
    return request({
      url: `/user/vaccine-appointment/save`,
      method: 'post',
      data: appointment
    })
  },
  List(searchObj) {
    return request({
      url: `/user/vaccine-appointment/list/${searchObj}`,
      method: 'get'

    })
  },
  ListFinish(searchObj) {
    return request({
      url: `/user/vaccine-appointment/listfinish/${searchObj}`,
      method: 'get'

    })
  },
  removeById(id) {
    return request({
      url: `/user/vaccine-appointment/remove/${id}`,
      method: 'delete'
    })
  },
  complete(id) {
    return request({
      url: `/user/vaccine-appointment/complete/${id}`,
      method: 'put'
    })
  },
  cancel(id) {
    return request({
      url: `/user/vaccine-appointment/cancel/${id}`,
      method: 'put'
    })
  },
  back(appointment) {
    return request({
      url: `/user/vaccine-appointment/back`,
      method: 'put',
      data: appointment
    })
  }
}
